home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tppop16.zip / NODICE.PAS < prev    next >
Pascal/Delphi Source File  |  1988-09-28  |  1KB  |  34 lines

  1. {$R-,S-,I+,D+,T+,F-,V-,B-,N-,L+ }
  2. {$M 1024,5120,5120}
  3. Program RemovePopUpDice;
  4.  
  5. { This is the companion program to POPDICE.  This short program removes }
  6. { the resident program from memory if it is loaded and if it is safe to }
  7. { do so.                                                                }
  8.  
  9. Uses Unhook;
  10.  
  11. Const
  12.   Version = '1.0';
  13.   Signature = $89; { This value MUST be the same as the resident program's }
  14.  
  15. Begin
  16.   WriteLn('Attempting to remove POPDICE from memory.');
  17.   If Installed(Signature)             { is it installed?    }
  18.     Then Begin                        { yes.                }
  19.       If OkToRemove(Signature)        { can it be unloaded? }
  20.         Then Begin                    { yes.                }
  21.           RemoveProgram(Signature);   { remove it.          }
  22.           WriteLn('POPDICE successfully removed.');
  23.         End
  24.       Else Begin                      { can't be safely removed }
  25.         WriteLn('Unable to remove POPDICE from memory!');
  26.         Halt(2);
  27.       End
  28.     End
  29.   Else Begin                          { program not found in memory. }
  30.     WriteLn('POPDICE is not installed.');
  31.     Halt(1);
  32.   End;
  33. End.
  34.